body {
	margin: 0;
}

@property --x {
	syntax: "<number>";
	inherits: true;
	initial-value: 0;
}

@property --y {
	syntax: "<number>";
	inherits: true;
	initial-value: 0;
}

#ghost-grid {
	block-size: 100svb;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	--x: 0;
	--y: 0;
}

div:has(svg) {
	display: flex;
	container-type: inline-size;

	svg {
		margin: auto;
		inline-size: 100%;
		max-inline-size: 40cqmin;
		block-size: auto;
	}
}

#ghost-grid:has(div:nth-child(1):hover) {
	--x: -1;
	--y: -1;
}

#ghost-grid:has(div:nth-child(2):hover) {
	--x: 0;
	--y: -1;
}

#ghost-grid:has(div:nth-child(3):hover) {
	--x: 1;
	--y: -1;
}

#ghost-grid:has(div:nth-child(4):hover) {
	--x: -1;
	--y: 0;
}

#ghost-grid:has(div:nth-child(5):hover) {
	--x: 0;
	--y: 0;
}

#ghost-grid:has(div:nth-child(6):hover) {
	--x: 1;
	--y: 0;
}

#ghost-grid:has(div:nth-child(7):hover) {
	--x: -1;
	--y: 1;
}

#ghost-grid:has(div:nth-child(8):hover) {
	--x: 0;
	--y: 1;
}

#ghost-grid:has(div:nth-child(9):hover) {
	--x: 1;
	--y: 1;
}

#ghost-grid svg :is(.eye, .dot) {
	transition-property: --x, --y;
	transition-duration: 0.2s;
	transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
	translate: calc(var(--x) * 1px) calc(var(--y) * 1px);
}



#buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

#buttons button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background-color: #4CAF50;
    color: white;
    border-radius: 5px;
}

#buttons button:hover {
    background-color: #45a049;
}
body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #e2ffdb;
    overflow: hidden;
    font-family: 'Courier New', monospace;
}

#ghost-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100vw;
    height: 100vh;
    position: relative;
}

#ghost-grid div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ghost {
    width: 20vmin;
    height: 20vmin;
}

#buttons {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.pixel-button {
    background-color: hsl(140, 59%, 55%);
    border: none;
    color: white;
    font-size: 2vmin;
    padding: 1vmin 2vmin;
    cursor: pointer;
    box-shadow: 0 0 0 2px white, 0 0 0 4px hsl(140, 59%, 55%);
    transition: background-color 0.3s ease;
}

.pixel-button:hover {
    background-color: hsl(140, 59%, 45%);
}